package com.ztesoft.web.common.db.dao.mapper;

import com.ztesoft.web.common.db.arg.DmSecondaryStageArg;
import com.ztesoft.web.common.db.po.DmSecondaryStagePO;

import java.math.*;
import java.util.*;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

public interface IDmSecondaryStageMapper {
    
    List<Integer> countByArg(DmSecondaryStageArg arg);

    List<DmSecondaryStagePO> selectByArg(DmSecondaryStageArg arg);

    DmSecondaryStagePO selectByPrimaryKey(Integer id);

    List<DmSecondaryStagePO> selectByArgAndPage(DmSecondaryStageArg arg, RowBounds rowBound);

    int insert(DmSecondaryStagePO record);

    int insertSelective(DmSecondaryStagePO record);

    int insertBatch(@Param("list") List<DmSecondaryStagePO> records);

    int updateByArgSelective(@Param("record") DmSecondaryStagePO record,
            @Param("arg") DmSecondaryStageArg arg);

    int updateByArg(@Param("record") DmSecondaryStagePO record,
            @Param("arg") DmSecondaryStageArg arg);

    int updateByPrimaryKeySelective(DmSecondaryStagePO record);

    int updateByPrimaryKey(DmSecondaryStagePO record);
    
    int deleteByArg(DmSecondaryStageArg arg);
    
    int deleteByPrimaryKey(Integer id);

	List<DmSecondaryStagePO> selectByInfoId(@Param("dmInfoId")Integer dmInfoId);
	
	int updateSecondaryStageCount(@Param("count")int count, 
			@Param("recordSize")int recordSize, @Param("infoId")int dmInfoId);

	DmSecondaryStagePO selectByRecord(DmSecondaryStagePO record);
	
	int updateSecondaryStageState(@Param("stateDate")Date stateDate, @Param("state")String state, @Param("dmInfoId")int dmInfoId);
    
}